package cn.gok.homework;

public class SuperWorker extends Worker{
    private float bonus;

    public float getBonus() {
        return bonus;
    }

    public void setBonus(float bonus) {
        this.bonus = bonus;
    }

    public SuperWorker(String name, String job, int salary, float bonus) {
        super(name, job, salary);
        this.bonus = bonus;
    }

    @Override
    public int doJob(int months) {
        return super.doJob(months);
    }

    public int doJob(int months,int addtionalHours) {
        return (int)(this.doJob(months)+this.getBonus()*this.getSalary()*addtionalHours/100);
    }
}